drop table jms_dm.dm_no_operate_site_num
CREATE TABLE jms_dm.dm_no_operate_site_num
(
date_time date COMMENT '查询日期' ,
site_name varchar(50) COMMENT '网点名称' ,
site_code varchar(50) COMMENT '网点code' ,
agent_name varchar(50) COMMENT '代理区名称' ,
agent_code varchar(50) COMMENT '代理区code' ,
is_operate  bigint COMMENT '是否运营，1是，0否',
create_time datetime COMMENT '创建时间'
) ENGINE = OLAP DUPLICATE KEY( date_time,site_name,site_code)
COMMENT "未运营网点数"
PARTITION BY RANGE(date_time)
(START ("2022-07-20") END ("2022-08-15") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(`site_code`) BUCKETS 2
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "2",
"in_memory" = "false",
"storage_format" = "V2"
);


